package com.jwt.vpower.view.ui {
	import TenCMS.components.textbox.textbox;
	
	import com.jwt.vpower.model.TenCMS_Components;
	import com.ui.Styles;
	
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.filters.DropShadowFilter;
	import flash.geom.Rectangle;
	
	public class TourGuideBtn extends Sprite {
		
		private var _bg:Shape;
		private var _text:textbox;
		
		private var _xml:XML;
		
		public function TourGuideBtn() {
			buttonMode = true;
			mouseChildren = false;
			
		
			_text = TenCMS_Components.TextBox(new Rectangle(0,0,75,20),"heading",Styles.DEFAULT_ITEM_TITLE);
			_text.height= 30;
			_text.x = 6;
			_text.y = 3;
			_text.autoSize = "left";
			_text.multiline = false;
			_text.embedFonts = true;
			_text.antiAliasType = "advanced";
			_text.name = _text.node = "label";
			
			
			var _dropShadow : DropShadowFilter = new DropShadowFilter(0,0,0x333333,.3,14,14,2,1);
			_bg = new Shape();
			_bg.graphics.beginFill(0xf8f8f8,.8);
			_bg.graphics.drawRoundRectComplex(0,0,20,30,0,0,0,0);
			_bg.graphics.endFill();
			_bg.filters = [_dropShadow];
			
			addChild(_bg);
			addChild(_text);
		}
		
		public function set contentxml(xml:XML):void {
			_text.contentxml = xml..tourGuide[0];
			_bg.width = _text.width + 12;
			x = 752 - _bg.width - 17;
			_xml = xml;
		}
		
		public function get contentxml():XML {
			return _xml;
		}
	}
}